package com.liukaixin.product.navi;

import android.view.ViewGroup;
import android.widget.TextView;

import com.jude.easyrecyclerview.adapter.BaseViewHolder;

public class GaragesViewHolder extends BaseViewHolder<Garage> {

    private TextView nameText;
    private TextView distanceText;
    private TextView emptySpaceText;

    public GaragesViewHolder(ViewGroup parent) {
        super(parent, R.layout.item_garage);
        nameText = $(R.id.name_text);
        distanceText = $(R.id.distance_text);
        emptySpaceText = $(R.id.empty_place_text);
    }

    @Override
    public void setData(final Garage garage){
        nameText.setText(garage.getName());
        distanceText.setText(String.valueOf(garage.getDistance()));
        emptySpaceText.setText(String.valueOf(garage.getEmptySpace()));
    }

}